<template>
	<view>
	<image src="/static/work1.jpg" mode="" class="img_bg" style="top: 0;"></image>
	<view class="margin-l20 margin-r20">
		<view class=" " v-for="(item,index) in list" :key="index" >
			<view class="button-st  card1" @tap="toDetail(item.file_url,item.filename)" >
				<view class="father" >
					<view class="siz_img display flex-wrap align-start justify-between " style="align-items: center;">
						<image src="../../../../static/work/videoContorl.jpg" class="navImage">
						</image>
						<view>
							{{item.filename}}
						</view>
						<view class="text-20">
							{{item.add_time}}
						</view>
					</view>
				</view>
				<view class="">{{item.text}}</view>
			</view>
			
		</view> 
		<!-- <view class="loading" v-show="!isShow">
			{{loadingText}}
		</view> -->
		<view class="text-center noNotice" v-show="isShow" style="margin-top: 200upx;">
			<image src="/static/notice.png" class="noticeImg"></image>
			<view class="font-gray margin-t30">暂无更多视频</view>
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				uid:'',
				token:'',
				list:[]
			}
		},
		onLoad() {
			this.uid = uni.getStorageSync('user').uid
			this.token = uni.getStorageSync('user').token
			this.getVideoList()
		},
		methods: {
			getVideoList(){
				const that=this
				uni.request({
					url:'https://aqmore.sxpz.vip/AppApi/LibraryOnline/index?uid='+this.uid+'&token='+this.token,
					method: 'GET',
					header: {
						'content-type': 'application/x-www-form-urlencoded',
					},
					success:function(res){
						console.log(res)
						that.list=res.data.datas
					}
				})
			},
			toDetail(e,g){
				console.log(e)
				uni.navigateTo({
					url:'videDetail?fileurl='+e+'&filename='+g
				})
			}
			
		}
	}
</script>

<style>
	page{
		
	}
	.siz_img {
		height: 150upx;
		width: 100%;
		
	
	}
	.button-st {
		width: 100%;
		margin-top: 30upx;
		text-align: center;
		font-size: 33upx;
		position: relative;
		transition: all 0.6;
	}
	.father {
		position: relative;
		
	}
	.navImage {
		position: relative;
		left: 2%;
		width: 150upx;
		height: 80%;
	}
</style>
